#include "FontManager.h"

namespace Engine
{
	sf::Font* FontManager::loadFont(std::string filename)
	{
		sf::Font temp;
		if(!temp.LoadFromFile("font/"+filename+"ttf"))return NULL;
		this->fontMap[filename] = temp;
		return &this->fontMap[filename];
	}
	sf::Font* FontManager::geTFont(std::string filename)
	{
		if(&fontMap[filename] == NULL)
			return loadFont(filename);

		return &fontMap[filename];
	}
	void FontManager::deleteFont(std::string filename)
	{
		fontMap[filename].~Font();
	}
}